package com.wmh.baseservice.merchant.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author wmh generator
 * @since 2022-03-03
 */
@ApiModel(value="MerchantGroupMember对象", description="商家团购成员表")
public class MerchantGroupMember implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "状态:	0")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "团购用户id")
    private Long usId;

    @ApiModelProperty(value = "团购商品id")
    private Long groupGoodsId;

    @ApiModelProperty(value = "团购商品价格档位id")
    private Long groupGoodsPriceId;

    @ApiModelProperty(value = "成团id")
    private Long itemId;

    @ApiModelProperty(value = "成团时间")
    private Date successGroupTime;

    public Long getId() {
        return id;
    }

    public MerchantGroupMember setId(Long id) {
        this.id = id;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public MerchantGroupMember setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public String getRemark() {
        return remark;
    }

    public MerchantGroupMember setRemark(String remark) {
        this.remark = remark;
        return this;
    }
    public Integer getVersion() {
        return version;
    }

    public MerchantGroupMember setVersion(Integer version) {
        this.version = version;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public MerchantGroupMember setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public MerchantGroupMember setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public Long getUsId() {
        return usId;
    }

    public MerchantGroupMember setUsId(Long usId) {
        this.usId = usId;
        return this;
    }
    public Long getGroupGoodsId() {
        return groupGoodsId;
    }

    public MerchantGroupMember setGroupGoodsId(Long groupGoodsId) {
        this.groupGoodsId = groupGoodsId;
        return this;
    }
    public Long getGroupGoodsPriceId() {
        return groupGoodsPriceId;
    }

    public MerchantGroupMember setGroupGoodsPriceId(Long groupGoodsPriceId) {
        this.groupGoodsPriceId = groupGoodsPriceId;
        return this;
    }
    public Long getItemId() {
        return itemId;
    }

    public MerchantGroupMember setItemId(Long itemId) {
        this.itemId = itemId;
        return this;
    }
    public Date getSuccessGroupTime() {
        return successGroupTime;
    }

    public MerchantGroupMember setSuccessGroupTime(Date successGroupTime) {
        this.successGroupTime = successGroupTime;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String US_ID = "us_id";

    public static final String GROUP_GOODS_ID = "group_goods_id";

    public static final String GROUP_GOODS_PRICE_ID = "group_goods_price_id";

    public static final String ITEM_ID = "item_id";

    public static final String SUCCESS_GROUP_TIME = "success_group_time";

    @Override
    public String toString() {
        return "MerchantGroupMember{" +
            "id=" + id +
            ", status=" + status +
            ", remark=" + remark +
            ", version=" + version +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", usId=" + usId +
            ", groupGoodsId=" + groupGoodsId +
            ", groupGoodsPriceId=" + groupGoodsPriceId +
            ", itemId=" + itemId +
            ", successGroupTime=" + successGroupTime +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            MerchantGroupMember.ID
            ,MerchantGroupMember.STATUS
            ,MerchantGroupMember.REMARK
            ,MerchantGroupMember.VERSION
            ,MerchantGroupMember.CREATE_TIME
            ,MerchantGroupMember.UPDATE_TIME
            ,MerchantGroupMember.US_ID
            ,MerchantGroupMember.GROUP_GOODS_ID
            ,MerchantGroupMember.GROUP_GOODS_PRICE_ID
            ,MerchantGroupMember.ITEM_ID
            ,MerchantGroupMember.SUCCESS_GROUP_TIME
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}